package bma.common.netty.webserver.matcher;

import bma.common.netty.webserver.Matcher;

public class MatcherStartWith implements Matcher {

	private String pattern;

	public MatcherStartWith() {
		super();
	}

	public MatcherStartWith(String v) {
		super();
		this.pattern = v;
	}

	public String getPattern() {
		return pattern;
	}

	public void setPattern(String v) {
		this.pattern = v;
	}

	@Override
	public boolean match(String v) {
		if (this.pattern == null)
			return false;		
		return v.startsWith(this.pattern);
	}

}
